import { ComponentBase } from "./ComponentBase";
import { CommandType, Message, MessageType } from "./Message";
// 第四步：由消息中心发送消息给各部门
export class MessageCenter {
    static ReceiveList: ComponentBase[] = [];
    // 发送消息
    static SendCustomMessage(type, command, content?) {
        let msg = new Message(type, command, content);
        for (const m of this.ReceiveList) {
            m.ReveiveMessage(msg);
        }
    }
}